home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / pcboard / pbs_v15.zip / PBSTRING.DOC < prev    next >
Text File  |  1996-05-18  |  86KB  |  1,757 lines

  1.  PBstring 1.5 - COPYRIGHT 1995,1996 - TRACY L. BAKER - STARPORT VALHALLA BBS
  2.              PBconfig 1.3 - COPYRIGHT 1995,1996 - TRACY L. BAKER
  3.             PBreplace 1.3 - COPYRIGHT 1995,1996  - TRACY L. BAKER
  4.                 }}} SPV is an *OFFICIAL* WWIV Support Site {{{
  5.     *** All the legal junk is at the end of this file, it must be read! ***
  6.                            >>> A CEREBRUM RELEASE <<<
  7.  
  8.           [[[ THIS PROGRAM MODIFIES YOUR SOURCE -- MAKE BACKUPS! ]]]
  9.  
  10.     <<< IF YOU ARE USING A 80286 COMPUTER, THIS PROGRAM WILL NOT WORK! >>>
  11.        <<< CONTACT PAPA BEAR (1@11579.WWIVNET) FOR A CUSTOM VERSION >>>
  12.  
  13.     STARTING WITH VERSION 1.4ß3, RUN SETUP.EXE THE FIRST TIME YOU USE THIS
  14.                                    PROGRAM!
  15.  
  16.                                { SECTION 0.0 }
  17.                             : TABLE OF CONTENTS :
  18. Section 1:
  19.           1.0 -------------- Introduction
  20.           1.1 -------------- Requirements
  21.           1.1.1 ------------ Hardware
  22.           1.1.2 ------------ Software
  23.           1.1.2.1 ---------- Software notes
  24.           1.1.3 ------------ Software that would be nice to have...
  25.           1.2 -------------- Installation
  26.           1.3 -------------- Features (or: bragging rights)
  27.           1.4 -------------- Escape codes, string files, and string editors
  28.           1.5 -------------- IMPORTANT NOTES ABOUT UNREGISTERED COPIES!
  29.           1.6 -------------- Notes about backups these programs make
  30.           1.7 -------------- Testing procedures, DISCLAIMERS, and more!
  31.           1.8 -------------- About the way data is entered.
  32.  
  33. Section 2:
  34.           2.0 -------------- Command line switches for PBstring
  35.           2.1 -------------- A word about those status lights
  36.           2.2 -------------- Keys you can play with during processing
  37.           2.3 -------------- Log file information
  38.           2.4 -------------- Debug information
  39.           2.5 -------------- Exit codes (error levels)
  40.  
  41. Section 3:
  42.           3.0 -------------- Notes about comments, variable declarations,
  43.                              preprocessor directives, and multiline printf()'s
  44.           3.1 -------------- Comments
  45.           3.2 -------------- Variable declarations
  46.           3.3 -------------- Preprocessor directives
  47.           3.4 -------------- Multiline printf() type lines
  48.  
  49. Section 4:
  50.           4.0 -------------- Of INC's and EXC's (and the √ explained, too!)
  51.           4.1 -------------- Inclusion file
  52.           4.2 -------------- Exclusion file(s)
  53.           4.2.0 ------------ Date checking file (PBSTRING.DTE)
  54.           4.2.1 ------------ File exclusion file (PBS-FILE.EXC)
  55.           4.2.2 ------------ Function exclusion file (PBS-FUNC.EXC)
  56.           4.2.3 ------------ Partial string exclusion file (PBS-CHAR.EXC)
  57.           4.2.4 ------------ Complete string exclusion file (PBS-STRG.EXC)
  58.           4.2.5 ------------ "STR_MOD" emulation
  59.  
  60. Section 5:
  61.           5.0 -------------- How to change WWIV source code to accept new
  62.                              STR files
  63.  
  64. Section 6:
  65.           6.0 -------------- PBreplace (PBREPL.EXE) documentation
  66.           6.1 -------------- Command line switches
  67.           6.2 -------------- Run time options (the selection screen)
  68.           6.3 -------------- More information
  69.  
  70. Section 7:
  71.           7.0 -------------- PBconfig (PBCONFIG.EXE) documentation
  72.           7.1 -------------- Command line switches
  73.           7.2 -------------- An important note about PBSTRING.INI
  74.  
  75. Section 8:
  76.           8.0 -------------- Legal junque (You _should_ read this!)
  77.           8.1 -------------- Copyright notice
  78.           8.2 -------------- Warranty
  79.           8.3 -------------- License Agreement
  80.           8.4 -------------- Registration
  81.  
  82. Section 9:
  83.           9.0 -------------- The Hall of Honor - those who have registered
  84.  
  85. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  86.  
  87.                                { SECTION 1.0 }
  88.                                : INTRODUCTION :
  89. Quite a long time ago, a great WWIV SysOp called Captain EJ (Eric Joy) and I
  90. wrote a program that would automatically remove the literal strings from the
  91. WWIV *.C source files and place them into an external *.STR file.  It did
  92. this as well as replacing the line in the *.C file with the appropriate
  93. get_stringx(); function call.  This program is called STR_MOD and its last
  94. version was v5.15b which was released on 1/20/94.
  95.  
  96. It was, and still is, a great saver of DGROUP.
  97.  
  98. However, it does have some bugs, and it is limited.  Unfortunately, due to a
  99. accident, the source to STR_MOD was lost shortly after v5.15b was released.
  100.  
  101. Now I have decided to re-create, and massively improved, STR_MOD into this
  102. program, PBstring.
  103.  
  104. PBstring will do everything STR_MOD did and more, much more.  It'll properly
  105. handle replaceable parameters, C escape codes, and other things STR_MOD
  106. didn't process.  All of this, with MUCH more flexibility.  This program is
  107. faster, too.
  108.  
  109. So what does this do?  It takes literal text, that text in C source code that
  110. lies between a set of double quotes, "like this", and removes it to an
  111. external data file.  That is its whole job.  Keep in mind that while this
  112. SOUNDS easy, it is not -- not even if you do it by hand (and I ought to know
  113. <G>).
  114.  
  115. Of course, your program should be able to read the data file (WWIV does a
  116. good job of this) to be able to "re-insert" the text back into the program
  117. during run-time.
  118.  
  119. This extracted text cuts WAAAAY down on DGROUP, and make it easier to modify
  120. the text strings (using a string editor such a WWIV Software Services' ESM
  121. [External String Manager]) without having to recompile the code.  This is
  122. especially great for this little cosmetic changes!
  123.  
  124. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  125.  
  126.                                { SECTION 1.1 }
  127.                                : REQUIREMENTS :
  128. PBSTRING.EXE, PBCONFIG.EXE, and PBREPL.EXE *MUST* all physically exist
  129. together in the directory that you're going to be using the program(s).
  130.  
  131. Any machine that is capable of running WWIV, especially a multinodal WWIV,
  132. should be able to run this program without any problems.  However, lets cover
  133. the hardware and software that is needed anyway.
  134.  
  135. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  136.  
  137.                               { SECTION 1.1.1 }
  138.                    : HARDWARE NEEDED TO RUN THIS PROGRAM :
  139. You need to be running at LEAST a machine with an 80386 processor and a VGA
  140. video adapter card.  If you are operating with "less" than this, let me know
  141. and I'll make you a custom copy of PBstring (and the associated programs).
  142.  
  143. For memory requirements, you need at least 160k free of conventional memory.
  144.  
  145. To run the PBconfig companion program by itself, you'll need 100k of free
  146. memory. If you run the PBconfig program via the PBstring program (IE: You use
  147. the /C or /SE switches -or- PBconfig executes automatically in the case of a
  148. non-existent or outdated INI file) you'll need at LEAST 260k free of
  149. conventional memory.
  150.  
  151. PBreplace needs 130k to operate in.
  152.  
  153. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  154.  
  155.                               { SECTION 1.1.2 }
  156.                    : SOFTWARE NEEDED TO RUN THIS PROGRAM :
  157. DOS, or any program capable of creating, or emulating, a DOS "window" or
  158. "session".  MSDOS, PCDOS, DRDOS [NovellDOS], OS/2, Windows 95, Windows 3.1x,
  159. DESQview, and possibly others, are qualifying candidates.
  160.  
  161. This program was written primarily with WWIV in mind.  The registration code
  162. checking is dependent on information from WWIV.  As a result, it has been
  163. tested, and works best, with WWIV source code.  However, this program will
  164. work fine with any program that supports external string files of the type
  165. used by WWIV.
  166.  
  167. C source code is also required. (duh!)
  168.  
  169. Again, since this program was written with WWIV in mind, the registration
  170. code key decryption is based on certain information available only from
  171. systems that are actually running WWIV.  If you wish to use this program and
  172. you do not run a WWIV, simply let me know as much, and arrangements can, and
  173. will, be made to suit your needs!
  174.  
  175. Borland C/C++ 3.1 or newer.  Borland's Turbo C/C++ 3.0 or newer.  One of these
  176. is kind of necessary if you want to compile WWIV's source code.  Cost varies
  177. greatly -- Turbo C is usually the cheaper of the two, however.  Any version
  178. older may not compile WWIV's source code correctly any longer.  (Borland
  179. C/C++ 2.0, if you can find it, may still work fine.)
  180.  
  181. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  182.  
  183.                              { SECTION 1.1.2.1 }
  184.                      : SPECIAL SOFTWARE CONSIDERATIONS :
  185. Again, at least 110k in DOS (or a DOS window, or session) is required.
  186.  
  187. PBstring also opens, and simultaneously maintains, MANY files.  At any given
  188. time during the normal operation of this program, PBstring or PBreplace have
  189. as many 20 files open.  I chose to do things this way because, quite simply,
  190. it makes the program *much* faster!  This is in conjunction that DOS needs
  191. for its operation during PBstring's execution.  As a result, the FILES setting
  192. (normally set in the CONFIG.SYS file -- but can be found in the AUTOEXEC.BAT
  193. file if using QEMM) must be set to at least 30 to be safe.  You'll know if
  194. you have too few specified if you get errors in PBstring indicating a certain
  195. file couldn't be opened.
  196.  
  197. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  198.  
  199.                               { SECTION 1.1.3 }
  200.               : OTHER SOFTWARE PROGRAMS THAT ARE NICE TO HAVE :
  201. Although the MINIESM.EXE that comes with WWIV can edit the string files
  202. created by PBstring, there are better ones out there.  External String
  203. Manager (ESM) can be obtained from WWIV Software Services (WSS).  The cost of
  204. this program is $5.
  205.  
  206. External String Editor (ESE) (from French Mod Division) will also work *IF*
  207. you do not allow PBstring to create, or convert to, 255 character long string
  208. files.  This can be done by using the /1 command line switch.  This editor is
  209. free.  It has also been reported to me that FMD's WWIVsys, with the built in
  210. string editor, will properly handle 255 character length strings.  WWIVsys'
  211. registration fee is $30.
  212.  
  213. STRPOP, also from WSS, is a great little utility that allows you to view and
  214. edit the strings associated with the get_string() / get_stringx() statements
  215. while you're working on your source.  First, you'd load STRPOP (its a TSR),
  216. then you go and edit your source file.  When you're in your editor, simply
  217. place your cursor on the line you want to see, and press ALT-V.  Supports
  218. multiple STR files, too.  Registration is $15.
  219.  
  220. Qedit v3.0+, from SemWare, is my all-time favorite editor.  Registration
  221. is $59.
  222.  
  223. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  224.  
  225.                                { SECTION 1.2 }
  226.                        : HOW TO INSTALL THIS PROGRAM :
  227. Simple, just place all of the PBstring files in your source directory. :)
  228. The files you're most interested in are: PBSTRING.EXE, PBREPL.EXE,
  229. PBCONFIG.EXE, PBS-CHAR.EXC, PBS-FILE.EXC, PBS-FUNC.EXC, PBS-FILE.EXC,
  230. PBSTRING.DTE, and the PBSTRING.REG files.
  231.  
  232. Then, run the SETUP.EXE that now comes with the archive.  READ ALL SCREENS
  233. and do what they are telling you to do.  This is the *best* way to get up and
  234. running for first-time installations.
  235.  
  236. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  237.  
  238.                                { SECTION 1.3 }
  239.                     : BRAGGING ABOUT MY PROGRAM TIME <G> :
  240. Well, first off, this program really DOES save a lot more DGROUP than
  241. STR_MOD.  On virgin source, this program saves an extra 6k of DGROUP over
  242. STR_MOD.  On my massively modded source code, after STR_MOD had its shot on
  243. the source, PBstring saved an additional 10k!
  244.  
  245. Additionally, I've been able to make PBstring much faster than STR_MOD.  I
  246. can process my entire source code in a hair over 2 minutes with PBstring.
  247. With STR_MOD, it was over 15 minutes.
  248.  
  249. Safety.  This is the name of the game when dealing with your C files -- you,
  250. and I, don't want all your hard work to go to waste. I've worked VERY hard to
  251. make certain that PBstring does not screw up your C files.  They're backed up
  252. *BEFORE* processing.  The processing that takes place for each line must pass
  253. through 4 tests that you determine (via exclusion files), and up to 10 more
  254. built into the program.  Only when a line of code has passed through all of
  255. these safety tests can it be processed for get_stringx(x,y) replacement.  The
  256. string files themselves are copied FROM the GFILES directory so they can be
  257. processed while the BBS is running, if you want to, without interference to
  258. the BBS.  If the string file already exists in the string directory, it, too,
  259. is backed-up into the proper PBSORGxx subdirectory off your source directory.
  260.  
  261. Information.  The PBSTRING.LOG file reports everything that is going on.
  262. Additionally, my standard DEBUG processing is here, too.  You'll know at all
  263. times what in the heck is going on with your source.  See section 2.4 for
  264. more information on DEBUG.XXX  Alternatively, use the /DEBUG switch to
  265. activate the DEBUG mode.
  266.  
  267. My program, unlike STR_MOD, properly creates 255 character-length string
  268. files when a new one is made.  STR_MOD made 100 character files which could
  269. cause problems for extra long strings.  Additionally, PBstring will take any
  270. of those old 100 or 161 character length files and convert them to the newer
  271. 255 character format.
  272.  
  273. Please review PBSTRING.HIS for a comprehensive listing of additions, bug
  274. fixes, and/or enhancements made to the various PBstring programs.
  275. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  276.  
  277.                                { SECTION 1.4 }
  278.         : OF ESCAPE CODES, STRING FILES, AND EXTERNAL STRING EDITORS :
  279. This program takes most of the standard C escape code sequences that most
  280. external string managers CANNOT read and translates them into single
  281. character equivalents that CAN be processed by an ESM.
  282.  
  283. An important note here.  While a carriage return appears as a \r in the
  284. source code, in the string file, it appears as an ASCII 13, looking like a
  285. musical note when viewing it with the editor (WSS's ESM), and a capital
  286. reverse M when editing it in ESM.  The popular \n appears as a ASCII 10,
  287. looking like a box with a circle in it when viewed, and a capital reverse J
  288. when editing.
  289.  
  290. Other escape codes that are converted are: \a, \b, \f, \t, and \v.  Please be
  291. aware that each has their own characters when viewed, and when edited in ESM.
  292.  
  293. PBstring, as of version 1.4, fully supports ASCII codes that follow C's
  294. escape code character.  In other words, codes like \003 and \007 are properly
  295. converted to their literal ASCII codes (a heart for \003 and a dot for \007).
  296. This will work for just about any format (3-digits, max) that you use.  \003,
  297. \03, \3 will all translate into a heart.
  298.  
  299. HOWEVER, you should write code using all three digits, like \003 (heart), \032
  300. (carriage return), \171 (a ½ symbol).  Why?  Well in WWIV, the \003 is
  301. sometimes used to indicated the start of a color code.  The heart that is
  302. generated tells WWIV to convert the NEXT character (usually a number) into
  303. the appropriate color.  This number *must* immediately follow the \003, like
  304. \0035 for the color green.  If you use \35 or \035 instead, PBstring will NOT
  305. know that you want the heart with a 5 following.  It will, instead translate
  306. this into an ASCII 35 in each case.
  307.  
  308. NOTE: String files created with this program are 100% compatible with the
  309. External String Manager (ESM) written by Tolkien and sold by WWIV Software
  310. Services.  It is entirely possible that the External String Editor (ESE)
  311. written by the French Mod Division (or the WWSYS /ESE) will *NOT* work.  I've
  312. had problems in the past with getting ESE to work properly with the "new"
  313. style 255-character string files.  While I've had problems in the past, I
  314. also have reports from people experiencing no problems whatsoever.  Using the
  315. /1 switch should ensure compatibility with ESE, although it will also limit
  316. the extraction of certain strings.
  317.  
  318. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  319.  
  320.                                { SECTION 1.5 }
  321.                 : WHY YOU SHOULD REGISTER THIS FINE PROGRAM :
  322. This program is cheap.  $20 is not a lot of money when you consider the
  323. amount of time it'll save you.  If you were to go through and remove all the
  324. valid strings from your source by hand, you'd not only be there a long time,
  325. but you'd inevitably miss some.  Additionally, you'll have to do it again.
  326.  
  327. By registering this program, you give me ample reason to continue development
  328. of this program, and start new ones.  You also give me something concrete to
  329. show my wife. :)
  330.  
  331. If left unregistered, You'll have to wait through a 60 second pause before
  332. and after the program executes.
  333.  
  334. So please register!
  335.  
  336. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  337.  
  338.                                { SECTION 1.6 }
  339.                       : THOSE EVER-IMPORTANT BACKUPS! :
  340. PBstring and PBreplace both automatically backup your source code and, if
  341. applicable, your string files too.
  342.  
  343. Starting with version 1.2 of PBstring (and 1.0 of PBreplace) the WAY it does
  344. this differs from previous versions.  Previously PBstring simply copied the C
  345. files to a file that had the same filename, and an ORG extension.  (Early
  346. ßetas of PBreplace did the same, but with a RPL extension.)  Additionally,
  347. PBstring would copy a pre-existing STR file over to a backup with a rather
  348. cryptic filename and a BAK extension.  This is no more.
  349.  
  350. Now PBstring and PBreplace will create a new subdirectory off your source
  351. directory and place the original files in them before any processing takes
  352. place on them.  The directories are incremental, meaning that for each time
  353. you run PBstring or PBreplace, a new backup directory is created so you can
  354. keep generations of backups.
  355.  
  356. For PBstring, the directory names are PBSORG00 to PBSORG99.  For PBreplace
  357. they're PBRRPL00 to PBRRPL99.  As each new directory is created, the counter
  358. is increased by one -- but ONLY if the directory number before any that exist
  359. are themselves present.
  360.  
  361. For example, if you're running PBstring for the 5th time, and you've not
  362. deleted any previous directories, PBSORG04 will be created, so you'll end up
  363. with the following dirs off your source dir:
  364.  
  365. PBSORG00
  366. PBSORG01
  367. PBSORG02
  368. PBSORG03
  369. PBSORG04
  370.  
  371. If, however, you've previously removed the old directories, then PBSORG00
  372. would be used (again).  If you've left PBSORG00, PBSORG01, PBSORG03 (skipping
  373. 02), then the next to be used would be PBSORG02 -- it fills in any dead spots.
  374. If you reach PBSORG99, and you run PBstring again, the program will halt with
  375. an error due to an inability to create a backup directory.  You can always
  376. find the newest directory by looking at the directory's date stamp.
  377.  
  378. PBreplace works in the same manner for the PBRRPL?? directories.
  379.  
  380. PBstring will backup a STR file that it finds in the source directory *OR* if
  381. it finds one in the string directory (as specified in the configuration
  382. editor) into the backup directory.  The C files are backup'ed into this
  383. directory, with an extension of ORG.
  384.  
  385. PBreplace backs-up the C files into its directory with extensions of RPL.
  386. Since it makes no changes the STR files, no backups of those are necessary.
  387.  
  388. Keep in mind that while PBstring and PBreplace process all the C files that
  389. you tell it, it will only keep backups of those files that it actually
  390. changes.  Those files that do not require any changes are kept as is.
  391.  
  392. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  393.  
  394.                                { SECTION 1.7 }
  395.                  : WHAT I TESTED THIS ON, AND A DISCLAIMER :
  396. I tested this on WWIV's virgin source.  I made certain that (1) PBstring
  397. would properly convert the C files, (2) that those C files would properly
  398. compile, and (3) that the resultant BBS.EXE would indeed execute.  I also
  399. made certain that the files I let it process were the same as those that
  400. Wayne Bell included get_string(); lines in.
  401.  
  402. I tested this on my *heavily* modified source.  I made certain that I could
  403. compile and use my source code.
  404.  
  405. I have also tested this using many examples of C source code obtained from
  406. many different people (usually when they discover a portion of the program
  407. that doesn't work).  In this manner, PBstring becomes more and more
  408. compatible with a much wider variety of programming styles.
  409.  
  410. PBreplace was also tested on my source.  I couldn't recompile, however, due
  411. to lack of DGROUP (<G>).
  412.  
  413. Additionally, I have ßeta testers that have tested this under OS/2, Windows
  414. 3.11, Windows 95, DESQview, PC-DOS 7.0, MS-DOS 6.22.  All of this on various
  415. machines and even LAN equipped systems.
  416.  
  417. Now a word of caution.  I cannot possibly know all the different ways that
  418. people program.  It may well be that this program chokes on something.  If it
  419. does, it is only because I've not seen that particular situation before,
  420. whatever that may be.  In other words, I can only guarantee that it worked on
  421. my source, and the virgin source, on the computer I'm using.
  422.  
  423. If you do find it choking, please E-Mail me the PBSTRING.LOG (if there's
  424. anything in it) and, and this is important, the C file it choked on.  I'll
  425. fix it from there.  E-Mail them to 1@11579.wwivnet.
  426.  
  427. While I have included what I feel are complete exclusion files (these are the
  428. files that keep PBstring from processing things it shouldn't), I may not have
  429. things in them that you need to successfully run this program.  Make certain
  430. the *carefully* check over things, and update your exclusion files as
  431. necessary!
  432.  
  433. REMEMBER, I wrote this program the best I know how.  It works well, and it
  434. has MANY safeguards built in to protect your source code.  However, I am not
  435. responsible for any damage or loss of your source code because of this
  436. program.  You chose to use it, so you're responsible.
  437.  
  438. You may find that after PBstring works its magic, and the source compiles
  439. fine, that your program (BBS) doesn't work correctly.  This is not caused by
  440. a problem with PBstring.  If anything, it is a case of PBstring working too
  441. well.
  442.  
  443. You see, a string may turn out to be a perfectly legitimate candidate for
  444. removal.  However, once removed, your program (BBS) will not handle it
  445. properly.  If you find this to be the case, then you can use the exclusion
  446. files (see Sections 4.2 - 4.2.5) to tell PBstring to skip over that line and
  447. avoid the problem in the future.
  448.  
  449. Keep in mind that you can either replace the entire C file to its original
  450. state by copying over it with its ORG companion.  Or, alternatively, you can
  451. simply replace that string with the one in the ORG file using a simple
  452. copy/paste sequence in your text editor.
  453.  
  454. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  455.  
  456.                                { SECTION 1.8 }
  457.                     : ABOUT THAT FANCY NEW ENTRY SCHEME :
  458. Beginning with version 1.4 of PBstring, and 1.2 of both PBconfig and
  459. PBreplace, I've introduced a new way of entering data.  It will now allow you
  460. to enter data instead of having to enter the new data in its entirety.
  461.  
  462. The keys that are active are: Backspace, Delete, Insert, left and right arrow
  463. keys, Home, Escape, and End.
  464.  
  465. The arrows, Home, End, Backspace, and Delete all work in the fashion that
  466. you're used to.
  467.  
  468. The Insert key toggles insert mode on or off (overstrike).
  469.  
  470. The Escape key clears the data from the field entirely, allowing you to enter
  471. new data.  If you press Escape, then Enter, the data field will be erased.
  472.  
  473. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  474.  
  475.                                { SECTION 2.0 }
  476.                           : COMMAND LINE SWITCHES :
  477. Here are the command lines that are available to this program:
  478. ──────────────────────────────────────────────────────────────────────────────
  479. [what to call this switch]    {example}
  480. /s{filename}  description
  481.               description
  482. example, if any
  483. ──────────────────────────────────────────────────────────────────────────────
  484. [? Help]                      {/?}
  485. /?            Display the online command line option menu.
  486. ──────────────────────────────────────────────────────────────────────────────
  487. [1oo character long strings]  {/1}
  488. /1            This causes PBstring to create 100 character long string files
  489.               instead of the default 255 character long files.  This may be
  490.               necessary for some systems for backwards compatibility sake.
  491. ──────────────────────────────────────────────────────────────────────────────
  492. [3-triples]                   {/3}
  493. /3            Normally, PBstring will *not* process strings that have 3 or
  494.               more sets of double quotes (") in them.  This means that
  495.               strings like:
  496.  
  497.    printf("This is a % test.",(TEST>0):"POSITIVE":"NEGATIVE");
  498.  
  499.               will not be processed.  However, by including this switch, you
  500.               are forcing PBstring to go ahead and process them.  In this
  501.               case, they are handled identically as other strings.  Be
  502.               forewarned, however, that this *CAN* and *HAS* caused erratic
  503.               behavior once the source is recompiled, and the program
  504.               executed.  This is not a fault of PBfiles, rather, it is that
  505.               of the string handling routines trying to read in all three
  506.               extracted strings from the string file properly.
  507. ──────────────────────────────────────────────────────────────────────────────
  508. [All files in INC]            {/A}
  509. /A            This causes the program to run just the same as if no /A switch
  510.               of any kind was used.  This is the default operating mode.
  511.               PBSTRING.INC is the inclusion file used.
  512. ──────────────────────────────────────────────────────────────────────────────
  513. /AA           Process all the files listed in the inclusion file, ignoring
  514.               any date checking.
  515. ──────────────────────────────────────────────────────────────────────────────
  516. [All files in other INC]      {/AMYFILES.INC}
  517. /A{fn}        Similar to the normal /A switch except that the inclusion file
  518.               named after the /A will be used instead of PBSTRING.INC
  519. ──────────────────────────────────────────────────────────────────────────────
  520. [All files!]                  {/A!}
  521. /A!           Do every C file in the current directory regardless of whether
  522.               it is in any inclusion file or exclusion file.  Date checking
  523.               is *NOT* preformed.
  524. ──────────────────────────────────────────────────────────────────────────────
  525. [Build new INC]               {/B}
  526. /B            Build new INC file from files in current directory, and use the
  527.               PBS-FILE.EXC file as the exclusion file to determine what files
  528.               not to include.  The program will run normally at this time.
  529.               The file that will be built is PBSTRING.INC.
  530. ──────────────────────────────────────────────────────────────────────────────
  531. [Build other INC]             {/BMYFILES.INC}
  532. /B{fn}        Same as /B, as above, except build and use {fn} instead of
  533.               PBSTRING.INC.
  534. ──────────────────────────────────────────────────────────────────────────────
  535. [Build INC, don't run!]       {/B!}
  536. /B!          Build a new PBSTRING.INC file, as the /B switch, but do *NOT*
  537.              run the program afterwards.
  538. ──────────────────────────────────────────────────────────────────────────────
  539. [Build other INC, don't run!] {/B!MYFILES.INC}
  540. /B!{fn}      Build a new {fn} inclusion file, but do *not* run the program.
  541. ──────────────────────────────────────────────────────────────────────────────
  542. [enter Configuration editor]  {/C}
  543. /C           Enter the PBstring configuration editor.  (This is done
  544.              automatically as: (1) the program is run the first time, (2) the
  545.              INI file is the incorrect length, or (3) the revision date is
  546.              incorrect).
  547. ──────────────────────────────────────────────────────────────────────────────
  548. [reinitialize Date file]      {/D}
  549. /D           Make the PBSTRING.DTE reflect the existing dates of the C files
  550.              in the current directory.  This means that next time PBstring is
  551.              run, no processing will take place unless the C file(s) have
  552.              been modified.  Note that this file is reinitialized after every
  553.              processing session.
  554. ──────────────────────────────────────────────────────────────────────────────
  555. [DEBUG information]           {/DEBUG}
  556. /DEBUG       Turns on DEBUG information in the PBSTRING.LOG file.  Takes the
  557.              place of having to have a DEBUG.XXX file in existence in the
  558.              current working directory.
  559. ──────────────────────────────────────────────────────────────────────────────
  560. [process single File]         {/FLILO.C}
  561. /F{fn[.C]}   Process the file specified after the /F.  Note that no date
  562.              checking will take place.  If the file exists in the
  563.              PBS-FILE.EXC exclusion file, you will be warned that you have
  564.              marked it as an "illegal" file.  PBstring will ask for
  565.              confirmation that you want to process the file before
  566.              continuing.  The .C extension is optional.
  567. ──────────────────────────────────────────────────────────────────────────────
  568. [toggle Log on/off]           {/L}
  569. /L           Turn log file entries to PBSTRING.LOG on/off in accordance with
  570.              the settings in the INI file.
  571. ──────────────────────────────────────────────────────────────────────────────
  572. [toggle Case comparisons]     {/NC}
  573. /NC          Normally, each string is considered different if the case of the
  574.              letters are different.  So these two strings would not be the
  575.              same:
  576.  
  577.   Test
  578.   test
  579.              By including this switch, these are made "equal".  The
  580.              comparisons are taken into consideration when checking for
  581.              duplicate entries in the string (*.STR) file you have specified.
  582.              Toggled on/off in accordance with the INI settings.
  583. ──────────────────────────────────────────────────────────────────────────────
  584. [toggle Heart comparisons)    {/NH}
  585. /NH          Normally, each string is considered different if the heart (WWIV
  586.              color codes) of the letters are different.  So these two strings
  587.              would not be the same (assuming ^ as a heart, ASCII 3):
  588.  
  589.   ^2test
  590.   ^1test
  591.              By including this switch, these are made "equal".  The
  592.              comparisons are taken into consideration when checking for
  593.              duplicate entries in the string (*.STR) file you have specified.
  594.              Toggled on/off in accordance with the INI settings.
  595. ──────────────────────────────────────────────────────────────────────────────
  596. [use Output File]             {/OFMODS2.STR}
  597. /OF{fn}      Redirect output to a STR file other than the one specified in
  598.              the INI file.
  599. ──────────────────────────────────────────────────────────────────────────────
  600. [use Output Number]           {/ON3}
  601. /ON{#}       Use a different string file number other than the one specified
  602.              in the INI file.
  603. ──────────────────────────────────────────────────────────────────────────────
  604. [Quiet mode]                  {/Q}
  605. /Q           Turn off/on most screen updating while processing.  This makes
  606.              the program *MUCH* faster when off!  Pressing F while processing
  607.              toggle this on/off.
  608. ──────────────────────────────────────────────────────────────────────────────
  609. [Quiet mode - Sound]          {/QS}
  610. /QS          Toggle on/off most sounds (in accordance with INI)
  611. ──────────────────────────────────────────────────────────────────────────────
  612. [use String length]           {/S4}
  613. /S{#}        Use a different limiting length for string processing other than
  614.              what has been specified in the INI file.  Strings *shorter* than
  615.              {#} will not be processed.  \r, \t, etc., and %s, %d, etc. are
  616.              *NOT* taken into consideration when determining the string
  617.              length.  So this string would have 16 characters, not 26:
  618.  
  619.   printf("\r\nThis has %d chars.\r\n",i);
  620. ──────────────────────────────────────────────────────────────────────────────
  621. [String locator Editor]       {/SE}
  622. /SE          Enter the editor that allows you to edit the locations of up 14
  623.              string files.  The program does not execute after using this
  624.              switch.
  625. ──────────────────────────────────────────────────────────────────────────────
  626. [Work disk]                   {/WG:}
  627. /W{disk}     This causes PBstring to use the {disk} as the place to create
  628.              the new C files.  A perfect candidate for this is a RAM drive.
  629.              PBstring keeps track of the total space left on the work disk.
  630.              The total is displayed in green until it drops below 81k (the
  631.              size of LISTPLUS.C -- most likely the largest C file you'll
  632.              process) when it'll then display in flashing red.  If the total
  633.              drops below the size of the C file currently being processed,
  634.              the program stops processing.
  635. ──────────────────────────────────────────────────────────────────────────────
  636. [Yes/no option]               {/Y}
  637. /Y           This will make PBstring stop on all strings that have passed the
  638.              programs testing parameters and ask you if you want to remove it
  639.              to the string file.  You can press Y or ENTER for yes, N for No,
  640.              or A to make it accept all the rest of the strings.
  641. ──────────────────────────────────────────────────────────────────────────────
  642.  
  643. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  644.  
  645.                                { SECTION 2.1 }
  646.                        : ABOUT THOSE "STATUS LIGHTS" :
  647. In the middle of the screen in PBstring, on line 13 to be precise, are 10
  648. "status lights".  These are indicators of what the program is up to at
  649. virtually any given moment.  They are:
  650.  
  651. CO - Currently in, or processing, a comment line or block
  652. PP - Processing a preprocessor directive
  653. VD - Processing a char[][]= type variable declaration -or- a structure block
  654.      with predefined literal strings.
  655. CF - Checking a valid string against PBS-FUNC.EXC
  656. CS - Checking a valid string against PBS-STRG.EXC
  657. CC - Checking a valid string against PBS-CHAR.EXC
  658. NP - Current string has no text and/or does not qualify for processing
  659. SS - Searching STR file for a valid place to put removed text
  660. DC - Checking file against PBSTRING.DTE to determine if it needs processed
  661. EC - Checking file against PBS-FILE.EXC to determine if it needs processed
  662.  
  663. Additionally, a small blinking ∙ will appear next to the status light that is
  664. active.  The affected lights are CF, CS, CC, DC, and EC.  If the ∙ appears
  665. next to the light, then it means that the appropriate *.EXC is being used.
  666.  
  667. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  668.  
  669.                                { SECTION 2.2 }
  670.            : KEYS YOU CAN PLAY WITH DURING PROCESSING IN PBSTRING :
  671. There's is the F key, and then there's all the rest.  Pressing any key other
  672. than the F key will cause the program to *abort* after it is finished with
  673. the file it is working on.
  674.  
  675. Pressing F will toggle the status of the "Quiet mode".  Quiet mode, when on,
  676. does not allow for screen updating except to display the filename currently
  677. being processed and how many lines are in that file.  When off, it allows all
  678. information to be processed.  The program runs MUCH faster with screen up-
  679. dating off (Quiet mode ON).  For example:  When run a on a 40,235 byte file
  680. it runs in 14 seconds with screen updating taking place, and in 8 seconds in
  681. Quiet mode.  Over the course of a complete WWIV source code, these time
  682. savings can be very significant.
  683.  
  684. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  685.  
  686.                                { SECTION 2.3 }
  687.                            : LOG FILE INFORMATION :
  688. PBstring supports a very robust log file reporting system.  PBSTRING.LOG is
  689. the file where almost anything done by the program is reported.
  690.  
  691. Here is a sample log file:
  692.  
  693. [PBstring 10ß01 log opened: August 18, 1995 at 22:28.55]
  694. Thanks for registering PBstring 10ß00, Papa Bear! :)
  695. Could not find C:\BOARD\GFILES\TEST.STR.
  696. !!! Creating new STR file.
  697.      »»»"Illegal" file checking is in effect.«««
  698.      »»»Date checking is in effect.«««
  699.      »»»Partial string checking is in effect.«««
  700.      »»»Full string checking is in effect.«««
  701.      »»»Function checking is in effect.«««
  702. Processing MMENU.C      
  703.            - passed PBS-FILE.EXC checking.
  704.            ### MMENU.C has not been modified -- skipping file.
  705. Processing GFILES.C     
  706.            - passed PBS-FILE.EXC checking.
  707.            ### GFILES.C has not been modified -- skipping file.
  708. ...
  709. Processing LILO.C       
  710.            - passed PBS-FILE.EXC checking.
  711.            - passed PBSTRING.DTE checking.
  712.            - Backing up to LILO.ORG
  713.            - Checking strings.
  714.   +>  ADD (1   ): USA                                                           
  715.   +>  ADD (2   ): CAN                                                           
  716.   +>  ADD (3   ): MEX
  717. ...
  718.   +>  ADD (11  ): 1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n      
  719.   *> DUPE (11  ): 1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n      
  720.   +>  ADD (12  ): CID NUM : %s
  721. ...
  722. -*-  Total NEW strings removed: 42
  723. -*- Total DUPE strings removed: 3
  724. -*-      Total strings removed: 45
  725. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  726. *-*  Total NEW strings removed -- all files: 42
  727. *-* Total DUPE strings removed -- all files: 3
  728. *-*      Total strings removed -- all files: 45
  729. Re-Building PBSTRING.DTE.
  730. >>> Shutting down PBstring 10ß00 at 22:29.12
  731.                Reason: FINISHED PROCESSING
  732.                  Code: 0
  733. Total time to run: 0 min., 14 secs.
  734.  
  735. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  736.  
  737.                                { SECTION 2.4 }
  738.                            : DEBUG IN DA MACHINE :
  739. If DEBUG.XXX (a file with anything in it) exists in the current directory,
  740. additional information is printed into the log file.  The physical presence
  741. of this file will active MOST all of the PB*.* utilities.  Debug works in
  742. PBreplace and PBconfig as well as PBstring.
  743.  
  744. Starting with version 1.3 (ßeta 5) of PBstring, and 1.1 of both PBreplace and
  745. PBconfig, DEBUG.XXX is no longer necessary.  It'll still be used if it is
  746. there.  Now you can activate the DEBUG coding by using /DEBUG as a command
  747. line switch for the program you're running.
  748.  
  749. This additional information make the log file look something like this:
  750.  
  751. [PBstring 10ß03 log opened: August 25, 1995 at 22:04.59]
  752. DEBUG: Memory left @ start: 518k (FCL) 518k (CL)
  753. Thanks for registering PBstring 10ß03, Papa Bear! :)
  754. /F  -- Processing single file (LILO.C)
  755. DEBUG: Current CFG revision date      : 803
  756. DEBUG: Registration Code is           : 12589647
  757. DEBUG: Log file entries are           : ON
  758. DEBUG: Ignoring embedded color codes? : NO
  759. DEBUG: Ignoring upper/lower case?     : NO
  760. DEBUG: Minimum string length for proc.: 5
  761. DEBUG: STR file number                : 7
  762. DEBUG: STR file name                  : TEST.STR
  763. DEBUG: Inclusion file name            : SINGLE.PBS
  764. DEBUG: STR directory is               : C:\WWIV\GFILES\
  765. DEBUG: BBS directory is               : C:\WWIV\
  766. DEBUG: ERR: PBstring could not locate TEST.STR!
  767. DEBUG: Commandline: COPY C:\WWIV\GFILES\TEST.STR C:\PBSTRING\TEST.STR > NUL
  768. DEBUG: TEST.STR has a string length of: 255
  769.      »»»"Illegal" file checking is in effect.«««
  770.      »»»Date checking is in effect.«««
  771.      »»»Partial string checking is in effect.«««
  772.      »»»Full string checking is in effect.«««
  773.      »»»Function checking is in effect.«««
  774. Processing LILO.C       
  775.            - Backing up to LILO.ORG
  776. DEBUG: ERR: PBstring could not locate LILO.ORG!
  777.            - Checking strings.
  778. DEBUG: Comment checking start line: 2
  779. DEBUG: Comment checking end line: 14
  780.   +>  ADD (1   ): USA                                                           
  781.   +>  ADD (2   ): CAN                                                           
  782.   +>  ADD (3   ): MEX
  783. ...
  784. -*-  Total NEW strings removed: 0
  785. -*- Total DUPE strings removed: 18
  786. -*-      Total strings removed: 18
  787. -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
  788. *-*  Total NEW strings removed -- all files: 0
  789. *-* Total DUPE strings removed -- all files: 18
  790. *-*      Total strings removed -- all files: 18
  791. Re-Building PBSTRING.DTE.
  792. DEBUG: ...Adding ADDRESS.C     to PBSTRING.DTE
  793. DEBUG: ...Adding BBSOVL1.C     to PBSTRING.DTE
  794. DEBUG: ...Adding BBSUTL.C      to PBSTRING.DTE
  795. ...
  796. DEBUG: ...Adding XFERTMP.C     to PBSTRING.DTE
  797. DEBUG: ...Adding REG.C         to PBSTRING.DTE
  798. >>> Shutting down PBstring 10ß03 at 22:05.23
  799.                Reason: FINISHED PROCESSING
  800.                  Code: 0
  801. Total time to run: 0 min., 20 secs.
  802. Total number of source lines processed: 1416
  803. DEBUG: Memory left at end: 517k (FCL) - 517k (CL)
  804.  
  805. Most of the information that is there is for my benefit should you have any
  806. problems.  Of course, you can get a better overall picture (as well as a
  807. *significantly* larger LOG file) about what is going on "underneath" all the
  808. pretty lights.
  809.  
  810. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  811.  
  812.                                { SECTION 2.5 }
  813.                          : THE ERROR LEVELS (CODES) :
  814. Utilities written by me support exit error codes (great for batch processing).
  815. A listing of all follows for PBstring:
  816.  
  817. -1 - No error.
  818. 00 - No error.
  819. 01 - COMSPEC variable not set.  Try setting COMSPEC in your AUTOEXEC.BAT file.
  820. 02 - Unknown error opening PBSTRING.CFG (it does exist).
  821. 03 - Could not find CONFIG.DAT
  822. 04 - Unknown error opening CONFIG.DAT.
  823. 05 - Unknown error reading CONFIG.DAT.
  824. 06 - (unregistered copies) FAILED random keypress.
  825. 07 - Could not open PBSTRING.CFG for saving.
  826. 08 - Could not build inclusion file.
  827. 09 - Could not create date file.
  828. 10 - Could not create PBSTRING.REG.
  829. 11 - No filename specified with /F switch.
  830. 12 - User did not want to process "illegal" file.
  831. 13 - Could not process single file.
  832. 14 - Could not open source STR file for copying.
  833. 15 - Could not open dest. STR file for copying.
  834. 16 - Did not want to make new STR file.
  835. 17 - Could not create new string file.
  836. 18 - Could not open inclusion file for main processing.
  837. 19 - Could not open input C file for main processing.
  838. 20 - Could not open output C file for main processing.
  839. 21 - Could not set up STR file for processing.
  840. 22 - Could not open PBS-FILE.EXC for main processing.
  841. 23 - Could not open PBSTRING.DTE for main processing.
  842. 24 - Could not open PBS-CHAR.EXC for main processing.
  843. 25 - Could not open PBS-STRG.EXC for main processing.
  844. 26 - Could not open PBS-FUNC.EXC for main processing.
  845. 27 - File abnormally closed, no resolution, in pre-processor checking.
  846. 28 - File abnormally closed, no resolution, in comment checking.
  847. 29 - File abnormally closed, no resolution, in variable declaration checking.
  848. 30 - Did not want to convert 100 or 161 char. string file length to 255.
  849. 31 - Error copying string file from GFILES directory.
  850. 32 - File abnormally closed, no resolution, in multiline quote checking.
  851. 33 - Error backing up C file to ORG storage directory.
  852. 34 - Error moving STR file back to GFILES directory.
  853. 35 - Error moving *.C files back from specified work disk.
  854. 36 - Error in displaying screen
  855. 37 - Could locate PBCONFIG.EXE and/or PBREPL.EXE in current directory
  856. 38 - Too little room on work disk to start. (file > bytes free on work disk)
  857. 39 - Couldn't create ORG storage directory (PBSORG00-PBSORG99 all exist).
  858. 40 - Couldn't create ORG storage directory (creation error).
  859. 41 - Error backing up STR file into ORG storage directory.
  860. 42 - Unable to open INI immediately after creation.
  861. 43 - Couldn't copy STR file into working directory.
  862. 44 - Error opening STR for reading/writing.
  863. 45 - Couldn't set up 100>255 temp. conversion file.
  864. 46 - (Conversion) Error in setting up file to be converted
  865.  
  866. Error exit codes generated by PBconfig are all in the 100-199 range, with the
  867. exceptions of -1 and 0:
  868.  
  869.  -1 - No error.
  870.   0 - No error.
  871. 100 - COMSPEC environment variable not set.
  872. 101 - Unable to open PBSTRING.INI for reading.
  873. 102 - Unable to write to (save) PBSTRING.INI.
  874. 103 - Unknown error opening PBSTRING.REG for writing.
  875.  
  876. Error exit codes generated by PBreplace are all in the 200-299 range, with
  877. the exceptions of -1 and 0:
  878.  
  879.  -1 - No error.
  880.   0 - No error.
  881. 200 - PBSTRING.EXE and/or PBCONFIG.EXE do not exist in current directory.
  882. 201 - COMSPEC variable not set.
  883. 202 - Error building default INC file.
  884. 203 - Failure building temporary inclusion file (all files - switch).
  885. 204 - No filename specified with /F switch.
  886. 205 - Didn't want to process "illegal" file.
  887. 206 - Failure building temporary inclusion file (single file - switch).
  888. 207 - Failure building temporary inclusion file (all files - internal).
  889. 208 - Failure building temporary inclusion file (single file - internal).
  890. 209 - Processing aborted.
  891. 210 - Could not open inclusion file for processing.
  892. 211 - Couldn't create RPL storage directory (creation error).
  893. 212 - Could not back up C to RPL
  894. 213 - Unresolved comment - reached EOF.
  895. 214 - C files left on specified work disk.  Error moving them back.
  896. 215 - Error displaying screen.
  897. 216 - Failed unregistered keypress.
  898. 217 - Couldn't find CONFIG.DAT.
  899. 218 - Error opening CONFIG.DAT for reading.
  900. 219 - Error reading CONFIG.DAT.
  901. 220 - Too little room on work disk to start. (file > bytes free on disk)
  902. 221 - Couldn't create RPL storage directory (PBSRPL00-PBSRPL99 all exist).
  903. 222 - Error checking file for its size.
  904.  
  905. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  906.  
  907.                                { SECTION 3.0 }
  908.  : A NOTE ABOUT COMMENTS, VARIABLE DECLARATIONS, & PREPROCESSOR DIRECTIVES :
  909.                  : AND MULTILINE PRINTF() TYPE LINES, TOO! :
  910. PBstring handles virtually all of these things quite well, including
  911. multiline versions of all.
  912.  
  913. However, there are a few caveats, as described in the following 3.x sections.
  914.  
  915. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  916.  
  917.                                { SECTION 3.1 }
  918.                                  : COMMENTS :
  919. Both types of comment types (those used in C -- /* */ and C++ -- //) are
  920. properly detected.
  921. Those lines that fall within a multiline comment block are *NOT* processed.
  922. For example:
  923.  
  924.     printf("TEST -- this would be processed!");
  925. /*
  926.     printf("This would not");
  927.     printf("me neither");
  928. */
  929.     printf("This would be.");
  930.  
  931. //    printf("Not processed!");
  932.  
  933.     printf("This will be processed.");                         // after code
  934.  
  935.  
  936. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  937.  
  938.                                { SECTION 3.2 }
  939.                           : VARIABLE DECLARATIONS :
  940. The following conditions MUST be true for PBstring to recognize pre-defined
  941. char variable declarations of either single, or multiline varieties:
  942.  
  943.   (1) If [] and ] = (or ]=) appear on the same line
  944.   (2) If the char variable declaration (with a trailing space) appears on
  945.         the same line with two left brackets ([) *and* two right brackets
  946.         (]) *and* a =, but with no ==
  947.   (3) If the char declaration appears with a [] and a = on the same line,
  948.         with no ==
  949.  
  950. PBstring will recognize the END of a multiline char variable declaration when
  951. it detects a }; on a line.
  952.  
  953. Examples of good and bad variable declarations:
  954.  
  955. ***********************************    OK:   *********************************
  956.            [ These are properly handled, therefore not processed. ]
  957.  
  958. char [9][10]={"as;ldk",";asdk;l",            // char , two [ and two ] and =
  959.               "1as;lkd","POIPOIP",
  960.               "2as;lkd","POIPOIP",
  961.               "3as;lkd","POIPOIP"};          // and the };
  962.  
  963.  
  964. char [9][10] = {"as;ldk",                    // ] = is just as okay as ]=
  965.               ";asdk;l",
  966.               "1as;lkd","POIPOIP",
  967.               "2as;lkd","POIPOIP",
  968.               "3as;lkd","POIPOIP"};
  969.  
  970. char [9][10] = {                             // char , two [ and two ] and =
  971.               "as;ldk",";asdk;l",
  972.               "1as;lkd","POIPOIP",
  973.               "2as;lkd","POIPOIP",
  974.               "3as;lkd","POIPOIP"};
  975.  
  976. char [][10] =                                // [] and ] = make this ok
  977. {
  978.               "as;ldk",";asdk;l",
  979.               "1as;lkd","POIPOIP",
  980.               "2as;lkd","POIPOIP",
  981.               "3as;lkd","POIPOIP"};
  982.  
  983. char [9][10] = {
  984.               "as;ldk",";asdk;l",
  985.               "1as;lkd","POIPOIP",
  986.               "2as;lkd","POIPOIP",
  987.               "3as;lkd","POIPOIP"
  988.                };                            //  }; here still ends it okay
  989.  
  990.  
  991. char *exts[] = {"", ".COM", ".EXE", ".BAT", 0};
  992.      // notice that this has all the elements to start, which in this case,
  993.      // are [] and ] =  The ending characters are also here };
  994.  
  995.  
  996. arc_testers arc_t[] = {             // this, too, isn't processed -- it
  997.   {"ZIP", check_for_files_zip},     // it includes the necessary [] and
  998.   {"ARC", check_for_files_arc},     // and ] = to start the exclusion, and
  999.   {"LZH", check_for_files_lzh},     // the }; to finish it
  1000.   {"ARJ", check_for_files_arj},
  1001.   {NULL, NULL},
  1002. };
  1003.  
  1004. ********************************    NOT OK:    *******************************
  1005.                 [ These are NOT properly handled by PBstring ]
  1006.             [ These can also cause unresolved Var. Decl. errors! ]
  1007.  
  1008. char [9][10]                               // no = on this line
  1009.               ={"as;ldk",";asdk;l",
  1010.               "1as;lkd","POIPOIP",
  1011.               "2as;lkd","POIPOIP",
  1012.               "3as;lkd","POIPOIP"};
  1013.  
  1014. char [9][10]  ={"as;ldk",";asdk;l",        // ]  = (TWO spaces) doesn't work
  1015.                 "1as;lkd","POIPOIP",
  1016.                 "2as;lkd","POIPOIP",
  1017.                 "3as;lkd","POIPOIP" };
  1018.  
  1019. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1020.  
  1021.                                { SECTION 3.3 }
  1022.                          : PREPROCESSOR DIRECTIVES :
  1023. All of (Borland and Turbo) C's preprocessor directives are properly handled.
  1024. The ones that support anything that may have double quotes are #define and
  1025. #include.
  1026.  
  1027. PBstring is smart enough to know the difference between a "true" preprocessor
  1028. directive, and one that just happens to be in a line of text.  In other
  1029. words, this would NOT be processed:
  1030.  
  1031. #include "test.h"
  1032.  
  1033. This WOULD be processed:
  1034.  
  1035. printf("Test - #include is a pre-proc. command");
  1036.  
  1037. Multiline directives are also handled correctly.
  1038.  
  1039. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1040.  
  1041.                                { SECTION 3.4 }
  1042.                       : MULTILINE PRINTF() TYPE LINES :
  1043. PBstring properly handles multiline printf() type statements (as of version
  1044. 1.1).  There are some things you should be aware of, however, so you can be
  1045. certain that the maximum number of strings are removed:
  1046.  
  1047.   If a comma (,), a semi-colon (;), open brace ({), or closed parenthesis ())
  1048.   is detected AFTER a pair of double quotes ("), the line WILL be processed.
  1049.  
  1050.   NOTE: This is only true for complete pairs of double quotes.
  1051.  
  1052.   NOTE: For WWIV users, npr(), pl(), etc. are treated like printf()
  1053.  
  1054. ***********************************    OK:   *********************************
  1055.                 [ These lines WILL be processed by PBstring ]
  1056.  
  1057.   sprintf(test,"This is a %s",       // notice the , before the 1st " and
  1058.          variable);                  // after the second (of the pair) "
  1059.  
  1060.   if (strcat(test,"TEST STRING"))    // again the , before the 1st "
  1061.  
  1062.   printf("This is a test string.");  // this has the ; after the paired "
  1063.  
  1064.   print("This is another %s",        // this has the , after the paired "
  1065.          test_variable);
  1066.  
  1067. ********************************    NOT OK:    *******************************
  1068.               [ These lines WILL NOT be processed by PBstring ]
  1069.  
  1070.   printf("This is line one"          // these lines are skipped over by
  1071.          "and line two"              // by PBstring -- they constitute a
  1072.          "and line three");          // multiline printf()
  1073.  
  1074.   printf("This is a test of %s"      //  This will not be processed--no , or
  1075.           ,not_working);             // ; or { after the paired " on line 1
  1076.                                      // PBstring skipping code will stop on
  1077.                                      // line 2 due to the ;
  1078.  
  1079.   sprintf(test,"TEST"                // no , after the paired " on line 1
  1080.                "TEST1");
  1081.  
  1082. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1083.  
  1084.                                { SECTION 4.0 }
  1085.                   : OF INC'S AND EXC'S -- AND A DTE, TOO! :
  1086. PBstring and PBreplace use inclusion and exclusion files to determine whether
  1087. or not a particular file or string is a valid candidate for processing.  If a
  1088. filename appears in the inclusion file as well as in the PBS-FILE.EXC
  1089. exclusion file, the exclusion file ALWAYS has precedence.
  1090.  
  1091. In the various *.EXC files, I have included information that I've found
  1092. *needs* to be in these files in order to get a working BBS.EXE file.
  1093.  
  1094. PBSTRING.INC, PBS-FILE.EXC, PBS-FUNC.EXC, PBS-CHAR.EXC, and PBS-STRG.EXC all
  1095. support the √ character.  What does this mean?  It means that if the first
  1096. character of any line in any of the files is a √, then that line is ignored,
  1097. it is not processed.  To make a √, press and hold your ALT key, and type the
  1098. number 251 on your *NUMBER PAD*.  It will make a √ -- if you use the top line
  1099. numbers, it will not.
  1100.  
  1101. So if you had this in PBSTRING.INC:
  1102.  
  1103. ADDRESS.C
  1104. √BATCH.C
  1105. BBS.C
  1106.  
  1107. Then ADDRESS.C and BBS.C would be processed, and BATCH.C would not.
  1108.  
  1109. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1110.  
  1111.                                { SECTION 4.1 }
  1112.                               : INCLUSION FILE :
  1113. PBstring determines which C files to process by reading from a listing of C
  1114. files that is the inclusion file.  By default, the inclusion file name to be
  1115. read is PBSTRING.INC, but this can be changed by using the /A{fn} switch.
  1116.  
  1117. [Of course, if the /A! or the /F{fn} switches are used, the inclusion file is
  1118. ignored.]
  1119.  
  1120. This file can be created by using the /B (/B{fn} if you want to build
  1121. something other than PBSTRING.INC).  This uses PBS-FILE.EXC (if it exists --
  1122. see section 4.2.1) to "filter out" unwanted file names.  File names that do
  1123. NOT appear in the PBS-FILE.EXC file will be added to the inclusion file.
  1124.  
  1125. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1126.  
  1127.                                { SECTION 4.2 }
  1128.                        : GENERAL EXCLUSION FILE NOTES :
  1129. Exclusion files are those files that cause things NOT to happen.  If a
  1130. filename appears in PBS-FILE.EXC, then it will not be processed.  If a string
  1131. appears in PBS-STRG.EXC (and a partial for PBS-CHAR.EXC) or a function name
  1132. appears in PBS-FUNC.EXC, then the current line under consideration from the C
  1133. file being processed will be skipped.
  1134.  
  1135. All of these files are files that you can, and should, actively edit.  They
  1136. can be changed using a standard text editor.
  1137.  
  1138. One more exclusion file, PBSTRING.DTE, should not be edited.  More on that in
  1139. section 4.2.0.
  1140.  
  1141. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1142.  
  1143.                               { SECTION 4.2.0 }
  1144.                                : PBSTRING.DTE :
  1145. PBSTRING.DTE is the file that tracks WHEN your C source files have been
  1146. modified.  It is automatically re-created after each time you successfully
  1147. run PBstring with no errors.  If there have been changes to the STR file
  1148. you've defined, and the program exits with no errors.
  1149.  
  1150. This way, you can always run PBstring in "all" (default) mode, and only those
  1151. files that you've updated since last running PBstring will be considered for
  1152. processing.  This saves considerable amount of time since it keeps PBstring
  1153. from looking at all files every time!
  1154.  
  1155. Although it is a standard ASCII text file, it should not be edited.  The
  1156. length and positioning of the fields in the file is critical for its proper
  1157. operation.  Any changes to this file will most likely cause it to process all
  1158. files (and create a new PBSTRING.DTE file), thereby wasting your time.
  1159.  
  1160. If you want to re-initialize this file, to keep it from processing ANY
  1161. changes that you may have made to your source code, simply use the /D command
  1162. line switch.
  1163.  
  1164. If you want to process all your source files listed in the INC file, then use
  1165. the /AA switch on the command line.
  1166.  
  1167. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1168.  
  1169.                               { SECTION 4.2.1 }
  1170.                                : PBS-FILE.EXC :
  1171. PBS-FILE.EXC is the file where you list the filenames of the files you do
  1172. *NOT* want processed.  This file takes precedence over the inclusion file.
  1173. This means that if a filename appears in this file, and in the inclusion
  1174. file, then it will not be processed.  This is to ensure safety of your
  1175. source.
  1176.  
  1177. To start, the file you get in the PBstring archive has 19 filenames.  These
  1178. are the files from virgin (unmodified) WWIV source that are either (1) not
  1179. compiled with the WWIV source to make BBS.EXE, or (2) had no
  1180. get_stringx(x,y); statements in them.  They are (in case you need to remake
  1181. the file):
  1182.  
  1183. BBS.C, BBSUTL.C, COM.C, CONVERT.C, EXTRN.C, FIX.C, MINIESM.C, MODEM.C,
  1184. RETURN.C, RIPOVL.C, RIPSPEED.C, SHARE.C, SKELETON.C, STRINGS.C, STRIP.C
  1185. SUBACC.C, SUBXTR.C, VERSION.C, XINIT.C
  1186.  
  1187. You made add/delete as you see fit.  Keep in mind that removing certain files
  1188. from this list (say, MODEM.C) may cause WWIV to work incorrectly.
  1189.  
  1190. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1191.  
  1192.                               { SECTION 4.2.2 }
  1193.                                : PBS-FUNC.EXC :
  1194. This file lists those function that normally SHOULDN'T have get_stringx(x,y);
  1195. statements in them.  Most notably existprint(), printfile(), and onek() come
  1196. to mind (for WWIV source code).  The comparisons *are* case sensitive.
  1197. NoAbort() is not treated the same as noabort()
  1198.  
  1199. To use this file, just place, one per line (case does not matter here) the
  1200. name of the function without the parenthesis.  In the source code, the
  1201. function call should look like on of the following:
  1202.  
  1203.   onek("ABCDE");
  1204.   onek ("ABCDE");
  1205.  
  1206.   The opening parenthesis should immediately follow, or be one space, after
  1207. the function call.  If it is not, it will most likely be processed as normal.
  1208.  
  1209. Default function "names" that come with this program are:
  1210.  
  1211. printfile, existprint, noabort, onek, print_local_file, getenv, setmenu
  1212. execlp, get_string, get_stringx, _chmod, comstr, random_screen,
  1213. set_strings_fn, sizeof, rip_show, todownload, current_menu, exist, strtok
  1214. sscanf
  1215.  
  1216. Some other functions, namely from Asylum's ACHAT, are now included, and they
  1217. are:
  1218.  
  1219. ini_read_boolean, ini_read_number, ini_read_string, auto_mail
  1220.  
  1221. For FMD's WFC mod, I've added:
  1222.  
  1223. ini_get
  1224.  
  1225. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1226.  
  1227.                               { SECTION 4.2.3 }
  1228.                                : PBS-CHAR.EXC :
  1229. This file is for PARTIAL string comparisons.  It *is* case sensitive as well.
  1230.  
  1231. Here you list, one per line, the partial string that, if they exist in the
  1232. line under current consideration by the program, will cause them to be
  1233. skipped over.
  1234.  
  1235. In STR_MOD, it was customary to include partial popular onek() command
  1236. strings such as, QABC.  (This was because the function exclusion file doesn't
  1237. work.)  In this case the following lines would *NOT* be processed:
  1238.  
  1239.   onek("QABCDEF");
  1240.   printf("This is a QABCDKLKJLK example."
  1241.  
  1242.   These lines *WOULD* be processed:
  1243.  
  1244.   printf("This is a qABCDKLKJLK example."  // lower case q makes it different
  1245.   onek("QAB");                             // doesn't match QABC
  1246.  
  1247. Now, since the PBS-FUNC.EXC file does work, partial onek() command strings
  1248. need not be specified (as long as you have onek listed in the PBS-FUNC.EXC
  1249. file, that is).
  1250.  
  1251. Note that this needs to be used with some care.  Although this is a cautious
  1252. program (and you may be keeping lines FROM being processed), over use of this
  1253. file can cause unnecessary amounts of text to remain in the program.  This
  1254. would not be a good thing for your DGROUP.
  1255.  
  1256. NOTE NOTE NOTE:  Certain partial strings are defaulted to in the program, and
  1257. should not be entered in this file.  These partial strings are:
  1258.  
  1259. \"
  1260. \x
  1261. \n!
  1262. |
  1263. char * (with a = also on the same line)
  1264. !|
  1265. %"
  1266. 1|
  1267. ""
  1268. \\
  1269. \033
  1270. _on_[]
  1271. _off_[]
  1272. [ASCII 27 - ESCAPE (sometimes seen as a small left pointing arrow.)]
  1273.  
  1274. The list of PBS-CHAR.EXC entries in archive file are (this is kind of long, and
  1275. keep in mind that they're separated by commas and that punctuation [besides
  1276. the commas] and imbedded blanks in the second one are intentional):
  1277.  
  1278. !-@,         ., .$$, .$$$, .ADD, .ANS, .B&W, .BAK, .BAT, .bat, .BBS, .brd
  1279. .CDR, .CFG, .CHT, .CNF, .COM, .com, .DAT, .DIR, .dsc, .DSC, .ed, .EXE, .exe
  1280. .EXT, .FRM, .GFL, .H, .ind, .IND, .inf, .INI, .ION, .LCL, .LOG, .LST, .MML
  1281. .mn, .MN, .MNU, .MOD, .MSG, .NDX, .NET, .NMM, .NUF, .PUB, .PW, .QWK, .QSC
  1282. .REG, .REP, .rip, .RIP, .RLZ, .RPT, .sav, .SDF, .SDI, .SUB, .sub, .STR, .SYS
  1283. .tag, .txt, .TXT, .UPD, .USR, .WWV, .XXX, .ZIP, .ZZZ, %sADDRESS, %sMSG
  1284. AUTOMSG., BBSLIST., EDITOR., GAMB-WL, NETWORK, NMMAIL%, PACKTMP$, POSTS.
  1285. RESTORE., STAT., SUBS., TEMP., TEMPCHAT., TMSG, WELCOME., get_string
  1286. get_stringx
  1287.  
  1288. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1289.  
  1290.                               { SECTION 4.2.4 }
  1291.                                : PBS-STRG.EXC :
  1292. This program is like the previous, except in that it looks for COMPLETE string
  1293. comparisons.  It, too, is case sensitive.
  1294.  
  1295. Therefore, if a line in this file reads:  This is a PARTY!
  1296. then this line would *NOT* be processed:
  1297.  
  1298.   printf("This is a PARTY!");
  1299.  
  1300. and this one WOULD be processed:
  1301.  
  1302.   printf("This is a party!");      // lower case party
  1303.  
  1304. If you find that you're adding a lot of lines like this to the file:
  1305.  
  1306. This is a PARTY!
  1307. Lets have a PARTY!
  1308. PARTY on, DUDE!
  1309.  
  1310. the you may wish to use the PBS-CHAR.EXC file instead.  You can put PARTY in
  1311. that file, and cover all three of these lines (and possibly more) with the
  1312. one line in the other exclusion file.
  1313.  
  1314. This technique makes PBstring run considerably faster.  In the last example,
  1315. for instance, PBstring would only have to search one line in PBS-CHAR.EXC
  1316. versus 3 lines (or more) in PBS-STRG.EXC.
  1317.  
  1318. Default strings are (^ represents a heart symbol):
  1319.  
  1320. *.*
  1321. %sFILE_ID.DIZ
  1322. EMAIL
  1323. < %s %s %s - %u %s >
  1324. ``%s``
  1325. %s%s@%u.%s\r\n
  1326. %s#%u@%u.%s\r\n
  1327. ^1T ^0- ^1%s\r\n
  1328. ^7[^1%s%s^7] [^1%s^7]^0 : ^2
  1329. T - %s\r\n
  1330. [%s%s] [%s] :
  1331. ^7(^1Conf %c^7)^0-^7(^1%s^7)
  1332. ^7(^1%s%s^7)^0-^7(^1%s^7)^0 : ^2
  1333. (%s%s)-(%s) :
  1334. %s #%u @%u
  1335. %s %u @%u (%s)
  1336.  
  1337. Additionally, I've added this for my ADDRESS.C modification:
  1338.  
  1339. Users Handle or Name           Network Address    [%s]
  1340.  
  1341. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1342.  
  1343.                               { SECTION 4.2.5 }
  1344.                  : HOW TO EMULATE STR_MOD WITH THIS PROGRAM :
  1345. This is simple. To do an emulation of STR_MOD, simply place these two lines
  1346. in PBS-CHAR.EXC:
  1347.  
  1348. %
  1349. \
  1350.  
  1351. That's it.  This will make PBstring act as STR_MOD without the bugs, and
  1352. limitations of the older program, and with all the speed of the newer.
  1353.  
  1354. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1355.  
  1356.                                { SECTION 5.0 }
  1357.            : MODIFYING WWIV SOURCE CODE TO ADD MORE STRING FILES :
  1358. All you need to do to activate a new STR file is to add one line to BBSUTL.C
  1359. Search on the following information (line 784 of virgin source):
  1360.  
  1361.   set_strings_fn(2, languagedir, "YES.STR", 0);
  1362.   set_strings_fn(3, languagedir, "NO.STR", 0);
  1363.  
  1364.   strncpy(str_yes,get_string(1), sizeof(str_yes)-1);
  1365.   strncpy(str_no,get_string(2), sizeof(str_no)-1);
  1366.  
  1367. Now, to add MODS.STR, with a string file number of 4, and a line like:
  1368.  
  1369.   set_strings_fn(2, languagedir, "YES.STR", 0);
  1370.   set_strings_fn(3, languagedir, "NO.STR", 0);
  1371.   set_strings_fn(4, languagedir, "MODS.STR",0);    // added this line <<<<<<<
  1372.  
  1373.   strncpy(str_yes,get_string(1), sizeof(str_yes)-1);
  1374.   strncpy(str_no,get_string(2), sizeof(str_no)-1);
  1375.  
  1376. You can, if you wish, change languagedir to point to ANY valid directory.  So
  1377. to use C:\FOO\BAR, you'd make the line look like:
  1378.  
  1379.   set_strings_fn(4, "C:\\FOO\\BAR", "MODS.STR",0);
  1380.  
  1381.  
  1382. You can use string file numbers up to 7 by default.  (PBstring supports up to
  1383. 19.)  To add more, find this line in STRINGS.C and increase it:
  1384.  
  1385.   #define MAX_STRFILES 8
  1386.  
  1387. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1388.  
  1389.                                { SECTION 6.0 }
  1390.                      : ALL ABOUT PBREPLACE (PBREPL.EXE) :
  1391. PBreplace basically allows you to replace the get_string() / get_stringx()
  1392. statements with the appropriate literal text strings from the string file
  1393. (STR) that the get_string[x]() statement points to.  There are, however, many
  1394. different ways that this can be used.
  1395.  
  1396. PBreplace will take strings out of BBS.STR, SYSOPLOG.STR, NO.STR, and YES.STR
  1397. (if you're using WWIV) as well as any others that you may have specified for
  1398. use in your program.  Option (C) from the selection screen, or the * command
  1399. while in the PBconfig program lets you specify string file filenames.
  1400.  
  1401. The original C files are backed up before processing takes place on them.
  1402. They retain the same filename with a new RPL extension (just like the ORG
  1403. extension that the extraction processing uses).  So a processed C file called
  1404. LILO.C will have an original counterpart call LILO.RPL.  You can easily
  1405. restore all C files by issuing a:
  1406.  
  1407. COPY *.RPL *.C
  1408.  
  1409. at the DOS prompt.
  1410.  
  1411. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1412.  
  1413.                                { SECTION 6.1 }
  1414.                      : PBREPLACE COMMAND LINE SWITCHES :
  1415. ──────────────────────────────────────────────────────────────────────────────
  1416. [what to call this switch]    {example}
  1417. /s{filename}  description
  1418.               description
  1419. example, if any
  1420. ──────────────────────────────────────────────────────────────────────────────
  1421. [? Help]                      {/?}
  1422. /?            Bring up the online help.
  1423. ──────────────────────────────────────────────────────────────────────────────
  1424. [All files!]                  {/A!}
  1425. /A!           Process ALL the C files in the current directory.
  1426. ──────────────────────────────────────────────────────────────────────────────
  1427. [Configuration editor]        {/C}
  1428. /C            Run the PBconfig editor.
  1429. ──────────────────────────────────────────────────────────────────────────────
  1430. [DEBUG information]           {/DEBUG}
  1431. /DEBUG       Turns on DEBUG information in the PBSTRING.LOG file.  Takes the
  1432.              place of having to have a DEBUG.XXX file in existence in the
  1433.              current working directory.
  1434. ──────────────────────────────────────────────────────────────────────────────
  1435. [do this File]                {/FBBS.C}
  1436. /F{fn}        Process only the file specified in {fn}.  Will check against
  1437.               PBS-FILE.EXC to make certain if its okay to work on.
  1438. ──────────────────────────────────────────────────────────────────────────────
  1439. [toggle Log file writes]      {/L}
  1440. /L            Turn PBSTRING.LOG entries on/off in accordance with the
  1441.               PBSTRING.INI settings.
  1442. ──────────────────────────────────────────────────────────────────────────────
  1443. [Mode 0 processing]           {/M0}
  1444. /M0           Replace all get_string / get_string(x) lines the program can
  1445.               find.
  1446. ──────────────────────────────────────────────────────────────────────────────
  1447. [Mode 1 processing]           {/M1NETWORK}
  1448. /M1{string}   Replace those strings where the {string} is found in the STR
  1449.               file for the string number specified.  Using this switch will
  1450.               not allow for multi-word strings.  Use Option B from the
  1451.               internal selection screen to achieve that.
  1452. ──────────────────────────────────────────────────────────────────────────────
  1453. [Mode 2 processing]           {/M2%}
  1454. /M2{char}     Similar to /M2{string} except that this looks for a single,
  1455.               specific character.
  1456. ──────────────────────────────────────────────────────────────────────────────
  1457. [Mode 3 processing]           {/M30}
  1458. /M3{#}        This will allow strings to be replaced only if the string file
  1459.               number being specified in the get_string() or get_stringx() is
  1460.               the same as {#}.
  1461. ──────────────────────────────────────────────────────────────────────────────
  1462. [Print reg. form]             {/P}
  1463. /P            Cause PBSTRING.REG to be created.  PBCONFIG.EXE is required for
  1464.               this.
  1465. ──────────────────────────────────────────────────────────────────────────────
  1466. [Quiet mode]                  {/Q}
  1467. /Q           Turn off/on most screen updating while processing.  This makes
  1468.              the program *MUCH* faster when off!  Pressing F while processing
  1469.              toggle this on/off.
  1470. ──────────────────────────────────────────────────────────────────────────────
  1471. [Quiet mode - Sound]          {/QS}
  1472. /QS          Toggle on/off most sounds (in accordance with INI)
  1473. ──────────────────────────────────────────────────────────────────────────────
  1474. [Work disk]                   {/WG:}
  1475. /W{disk}     This causes PBreplace to use the {disk} as the place to create
  1476.              the new C files.  A perfect candidate for this is a RAM drive.
  1477.              PBreplace keeps track of the total space left on the work disk.
  1478.              The total is displayed in green until it drops below 81k (the
  1479.              size of LISTPLUS.C -- most likely the largest C file you'll
  1480.              process) when it'll then display in flashing red.  If the total
  1481.              drops below 25k (the average size of a C file), the program
  1482.              stops processing.
  1483. ──────────────────────────────────────────────────────────────────────────────
  1484. [Yes/no option]               {/Y}
  1485. /Y           This will make PBstring stop on all strings that have passed the
  1486.              programs testing parameters and ask you if you want to remove it
  1487.              to the string file.  You can press Y or ENTER for yes, N for No,
  1488.              or A to make it accept all the rest of the strings.
  1489. ──────────────────────────────────────────────────────────────────────────────
  1490.  
  1491. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1492.  
  1493.                                { SECTION 6.2 }
  1494.                       : THE INTERNAL SELECTION SCREEN :
  1495. After execution PBREPL.EXE, you'll be show a screen that will allow you to
  1496. (re)select the operating options of PBreplace.  It looks like:
  1497.  
  1498. ╓────────────────────────────────────────────────────────────────────────────╖
  1499. ║                                                                            ║
  1500. ╟────────────────────────────────────────────────────────────────────────────╢
  1501. ║ [A] Operational Mode          :                                            ║
  1502. ║ [B] Secondary operational mode:                                            ║
  1503. ║ [C] Configure STR locations                                                ║
  1504. ║ [Q] Begin processing, also: ENTER                                          ║
  1505. ║ [*] Abort processing, also: ESC                                            ║
  1506. ╟────────────────────────────────────────────────────────────────────────────╢
  1507. ║                                                                            ║
  1508. ║                                                                            ║
  1509. ╙────────────────────────────────────────────────────────────────────────────╜
  1510.  
  1511. While options Q (ENTER) and * (ESC) are obvious, explanations are needed for
  1512. the others.
  1513.  
  1514. OPTION A: Operational Mode - This lets you select from three choices that
  1515.           control which FILES will be processed:
  1516.   [A] all C files that exist in the current directory (/A!)
  1517.   [F] a single file (/F{fn})
  1518.   [I] all C files that are listed in the inclusion (INC) file
  1519.  
  1520. OPTION B: Secondary Operational Mode - Here you have control over which
  1521.           STRINGS will be replaced:
  1522.   [A] every get_string() and get_stringx() the program finds (/M0)
  1523.   [C] all strings in the string file that have the specified character in it
  1524.         (/M1{string})
  1525.   [N] all strings in the specified string file number (/M2{char})
  1526.   [S] all strings in the string file with the specified {partial} string in
  1527.         it (/M3{#})
  1528.  
  1529.   *NOTE*: The [C] and [S] options are case sensitive!
  1530.  
  1531. OPTION C: This is the editor (also available via PBSTRING /SE, PBCONFIG /S,
  1532.           or the * command while in the main configuration editor) that
  1533.           allows you to tell PBstring WHAT the names of all your string files
  1534.           that you're using in your source code.  When adding the filenames,
  1535.           *DO NOT* add any path information.  The .STR extension is optional.
  1536.           See SECTION 7.2 for a complete description of the string file file-
  1537.           name editor.
  1538.  
  1539. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1540.  
  1541.                                { SECTION 6.3 }
  1542.                         : MISCELLANY ABOUT PBREPLACE :
  1543. While PBreplace is executing, you can press the F key to turn off screen
  1544. updating at any time (thereby speeding up the program), or any other key to
  1545. abort the processing (it will only stop between files).
  1546.  
  1547. You'll be notified of what C file is being processed, what STR file (and
  1548. string number) is being used, how many strings have been replaced in that
  1549. file (as well as totals) and how many "orphaned" strings are found.
  1550.  
  1551. Orphaned strings are those strings that point to (1) string files that do not
  1552. physically exist as have been specified in the editor, or (2) those
  1553. get_string[x]() statements where the string number is greater than the total
  1554. number of strings in the string file it points to.
  1555.  
  1556. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1557.  
  1558.                                { SECTION 7.0 }
  1559.            : EVERYTHING YOU WANTED TO KNOW ABOUT PBCONFIG.EXE... :
  1560. PBconfig is the new (as of PBstring version 1.2) stand-alone configuration
  1561. editor.  I did this to save memory, and to actually make things easier.
  1562. PBconfig makes and/or edits the PBSTRING.INI file.
  1563.  
  1564. The use of this program is quite simple.  Just answer the questions it asks
  1565. when you select an item.  If you choose option *, you'll enter the string
  1566. locator editor.  This editor is covered at the end of Section 6.0.
  1567.  
  1568. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1569.  
  1570.                                { SECTION 7.1 }
  1571.                       : PBCONFIG COMMAND LINE SWITCHES :
  1572. PBconfig has few command line switch, which are:
  1573. ──────────────────────────────────────────────────────────────────────────────
  1574. [what to call this switch]    {example}
  1575. /s{filename}  description
  1576.               description
  1577. example, if any
  1578. ──────────────────────────────────────────────────────────────────────────────
  1579. [? Help]                      {/?}
  1580. /?            Bring up the online help.
  1581. ──────────────────────────────────────────────────────────────────────────────
  1582. [DEBUG information]           {/DEBUG}
  1583. /DEBUG       Turns on DEBUG information in the PBSTRING.LOG file.  Takes the
  1584.              place of having to have a DEBUG.XXX file in existence in the
  1585.              current working directory.
  1586. ──────────────────────────────────────────────────────────────────────────────
  1587. [toggle Log entries]          {/L}
  1588. /L            Toggle writing to the PBSTRING.LOG file.  This does take into
  1589.               consideration the PBSTRING.INI settings.
  1590. ──────────────────────────────────────────────────────────────────────────────
  1591. [Must save]                   {/M}
  1592. /M            Force PBconfig into saving configuration information, even if
  1593.               the (2 - Abort) option is selected.
  1594. ──────────────────────────────────────────────────────────────────────────────
  1595. [Print reg. form]            {/P}
  1596. /P            Cause PBconfig to re-create a new PBSTRING.REG file.
  1597. ──────────────────────────────────────────────────────────────────────────────
  1598. [specify String files]       {/S}
  1599. /S            Enter directly into the string file filename editor.
  1600.               (Q)uitting after using this switch exits the program.
  1601.  
  1602. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1603.  
  1604.                                { SECTION 7.2 }
  1605.                        : STRING FILE FILENAME EDITOR :
  1606. While the information on this editor is fairly straightforward, there are
  1607. some things that may need to be clarified.  This is the screen-shot of the
  1608. editor:
  1609.  
  1610. ╔════════════════════════════════════════════════════════════════════════════╗
  1611. ║Please define the strings file(s) that you use in your program's source code║
  1612. ╠════════════════════════════════════════════════════════════════════════════╣
  1613. ║ [0] C:\WWIV\GFILES\BBS.STR                                                 ║
  1614. ║ [1] C:\WWIV\GFILES\SYSOPLOG.STR                                            ║
  1615. ║ [2] C:\WWIV\GFILES\NO.STR                                                  ║
  1616. ║ [3] C:\WWIV\GFILES\YES.STR                                                 ║
  1617. ║ [4] C:\WWIV\GFILES\MODS.STR                                                ║
  1618. ║ [5] C:\WWIV\GFILES\TAG.STR                                                 ║
  1619. ║ [6] C:\WWIV\GFILES\TRIVIA.STR                                              ║
  1620. ║ [7] C:\WWIV\GFILES\RANSTR.STR                                              ║
  1621. ║ [8] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1622. ║ [9] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1623. ║ [A] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1624. ║ [B] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1625. ║ [C] .THIS ENTRY HAS NOT BEEN SPECIFIED.                                    ║
  1626. ║ [D] C:\CPP\TEST.DAT                                                        ║
  1627. ║ [Q] Quit back to main configuration screen                                 ║
  1628. ╠════════════════════════════════════════════════════════════════════════════╣
  1629. ║                                                                            ║
  1630. ╚════════════════════════════════════════════════════════════════════════════╝
  1631. *NOTE*: This screen allows to to specify up to the allowed 14 string files.
  1632.         Options A-D refer to string file numbers 10-13.
  1633.  
  1634. IMPORTANT:  You must have entry 0 filled in, even if it is with a bogus
  1635.             filename.
  1636.  
  1637. Simply select the option you want (0-9,A-D,Q) and enter the file name.  As
  1638. you see here, you *can* skip lines.  If you enter a filename, with no path or
  1639. file extension, then the file is appended with .STR and the path information
  1640. [as you've defined on the main configuration screen] is added.  So entering
  1641. simply BBS in this case would automatically generate C:\WWIV\GFILES\BBS.STR
  1642.  
  1643. If path information *is* entered, then no information whatsoever is added to
  1644. your entry.  So C:\CPP\TEST would remain that way.  In this manner you can
  1645. specify string files in various locations (and with file extension other than
  1646. STR, or none at all).
  1647.  
  1648. To clear an entry, select the option of the string you want to clear, then
  1649. press ESC, then ENTER.  .THIS ENTRY HAS NOT BEEN SPECIFIED. will then be
  1650. displayed in the place of the string file definition.
  1651.  
  1652. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1653.  
  1654.                                { SECTION 7.3 }
  1655.                    : AN IMPORTANT NOTE ABOUT PBSTRING.INI :
  1656. Since this INI file is getting larger, I highly recommend that you *DO NOT*
  1657. edit it by hand.  That's what PBconfig is for, so please use it! :)
  1658.  
  1659. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1660.  
  1661.                                { SECTION 8.0 }
  1662.                                : LEGAL JUNQUE :
  1663. PBstring   - Copyright (C) 1995-1996 - by Tracy L. Baker
  1664. STR_MOD    - Copyright (C) 1994      - by Eric W. Joy
  1665. WWIV       - Copyright (C) 1988-1996 - Wayne Bell
  1666. Qedit      - Copyright (C) 1985-1996 - SemWare Corp.
  1667. STRPOP     - Copyright (C) 1993      - Jon R. Rickher
  1668. ESM        - Copyright (C) 1990-1993 - Jon R. Rickher
  1669.  
  1670. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1671.  
  1672.                                { SECTION 8.1 }
  1673.                                 : COPYRIGHT :
  1674. The PBstring software and its accompanying documentation are protected by
  1675. both United States copyright law and international treaty provisions.  You
  1676. may make copies of this program, and distribute those copies, provided that
  1677. you do not change any part of the PBS*.* archive, which include:
  1678.  
  1679. PBSTRING.EXE    [The executable file.]
  1680. PBCONFIG.EXE    [The configuration editor.]
  1681. PBREPL.EXE      [The string replacement module.]
  1682. SETUP.EXE       [Initial setup program.]
  1683. PBSTRING.DOC    [This documentation file.]
  1684. PBSTRING.HIS    [History of revisions file.]
  1685. PBSTRING.ANN    [My version related announcement file.]
  1686. PBS-FILE.EXC    [Exclusion file for files for stock WWIV 4.24.]
  1687. PBS-FUNC.EXC    [Exclusion file for functions for stock WWIV 4.24.]
  1688. PBS-CHAR.EXC    [Exclusion file, mainly for example, for partial strings.]
  1689. PBS-STRG.EXC    [Exclusion file, mainly for example, for complete strings.]
  1690. FILE_ID.DIZ     [BBS description file.]
  1691.  
  1692. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1693.  
  1694.                                { SECTION 8.2 }
  1695.                                  : WARRANTY :
  1696. PBstring is provided as is, without warranty, either expressed or implied.
  1697. The author specifically disclaims all other warranties, expressed or implied,
  1698. including, but not limited to, any implied warranty of merchantability or
  1699. fitness for a particular purpose.  You're using it, and I'm not responsible.
  1700.  
  1701. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1702.  
  1703.                                { SECTION 8.3 }
  1704.                             : LICENSE AGREEMENT :
  1705. Users are granted a limited license to use the unregistered version of
  1706. PBstring for an evaluation period not to exceed thirty (30) days. Any other
  1707. use of PBstring, or use past the evaluation period requires registration.
  1708. Users may freely copy and distribute PBstring, provided that no fee is
  1709. charged, and that the PBstring archive contains unmodified copies of the
  1710. original files as produced by the author.  No part of PBstring may be
  1711. modified, altered, reverse engineered, or sold without prior written
  1712. permission from the author.
  1713.  
  1714. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1715.  
  1716.                                { SECTION 8.4 }
  1717.                                : REGISTRATION :
  1718. Registration allows you to use PBstring past the 30 day trial period.  It
  1719. also removes the random "press this key" delay during the program's startup.
  1720. Plus, it makes you feel better and encourages further development of this,
  1721. and other, software by the author.  Registration is $20 (US currency only).
  1722. Fill out the form in PBSTRING.REG and send it, and the $20 check or money
  1723. order to the address in PBSTRING.REG.  Finally, registering this program will
  1724. convince my wife that all the hours of development I've put in this project
  1725. really are worth it!
  1726.  
  1727.   Send your registrations to:
  1728.  
  1729.   Tracy L. Baker
  1730.   114 Sea Bridge
  1731.   Alameda, CA 94502
  1732.  
  1733. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1734.  
  1735.                                { SECTION 9.0 }
  1736.               : THE HALL OF HONOR -- THOSE WHO ARE REGISTERED :
  1737.       Hobbit                The Miller Music BBS           607-898-3139
  1738.       Spam Burger           The Sniper BBS                 319-277-2624
  1739.       Dawg                  The Dawg House                 314-940-1253
  1740.       Infinity              Hard Disk Café                 612-753-9960
  1741.       Swordfish             FishTank                       612-757-0218
  1742.       Kirk                  StarFleet Command              904-448-1655
  1743.       The Shadow            Sysco BBS                      806-797-3750
  1744.       Morgul                The Trading Post [SOUTH]       803-731-0690
  1745.       Stainless Steel Rat   The Final Frontier BBS         701-293-9197
  1746.       Batman                Arkham Asylum                  619-747-0346
  1747.       WhiteHeart            The Highlands BBS              904-388-1445
  1748.       Spotnick              Digital Republic               418-698-7015
  1749.       Lancer                Asgardian Realm                314-291-6762
  1750.       Sean Settle           Warlock's Realm                919-937-0682
  1751.       Hammer                The Anvil BBS [ASV]            541-746-9479
  1752.       Jiff                  Devcon BBS                     719-646-3177
  1753.       Akai Ryu              Chaotic Artistry               703-486-2631
  1754.  
  1755. -<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-<*>-
  1756.  
  1757.